package tech.powerjob.common;

import lombok.Data;

import java.util.Objects;

/**
 * @program: powerJob
 * @description:
 * @author: YuKai Fan
 * @create: 2024/1/21 16:44
 **/
@Data
public class PageQuery {
    /**
     * 当前页数
     */
    private Integer pageNo;

    /**
     * 每页数量
     */
    private Integer pageSize;

    public Integer getPageNo() {
        return Objects.isNull(pageNo) || pageNo <= 0 ? 1 : pageNo;
    }

    public Integer getPageSize() {
        return Objects.isNull(pageSize) ? 10 : pageSize;
    }
}
